package com.guoxin.artconcurrency.chapter3;

public class FinalReferenceEscapeExample {
	final int i;
	static FinalReferenceEscapeExample obj;
	
	public FinalReferenceEscapeExample(){
		i=1;			//1 写final域
		obj = this; // 2this引用在此“逸出”
	}
	
	public static void writer(){
		new FinalReferenceEscapeExample();
	}
	
	public static void reader(){
		if(obj != null){
			int temp = obj.i;
		}
	}
}
